package custom_sorting;

public class References {
	public static void main(String args[]) {

		ValueObject ref1, ref2;
		ref1 = new ValueObject("sairam", 1235);
	//	ref2 = new ValueObject("sairam", 1235);
		 ref2 = ref1;
		System.out.println("Normal object");
		System.out.println("ref1:" + ref1.hashCode());
		System.out.println("ref2:" + ref2.hashCode());
		System.out.println(ref1.equals(ref2));
		System.out.println(ref1 == ref2);

		String a, b;
		a = new String("l");
		b = new String("l");
		// b = a;
		System.out.println("String object");
		System.out.println(a.hashCode());
		System.out.println(b.hashCode());
		System.out.println(a.equals(b));
		System.out.println(a == b);

		Integer c, d;
		c = new Integer(3);
		d = new Integer(3);
		// c=d;
		System.out.println("Integer object");
		System.out.println(c.hashCode());
		System.out.println(d.hashCode());
		System.out.println(c.equals(d));
		System.out.println(c == d);
	}
}
